const mongoose =require("mongoose")

//创建一个约束对象
const adminSchema = new mongoose.Schema({
    adminName: {
        type: String,
        unique: true,
        required: true
    },
    password: {
        type: String,
        required: true
    },
    regTime: {
        type: String,
        required: true
    },
    loginTime: {
        type: String,
        required: true,
        default:"----"
    },
    state:{
        type:Number,
        required: true,
        default:"0"
    }
});

//3.根据某个约束对象,去创建某个集合
const adminModel = mongoose.model("adminList", adminSchema);

module.exports = adminModel;